home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 2 / CU Amiga Magazine's Super CD-ROM 02 (1996)(EMAP Images)(GB)[!][issue 1996-04].iso / magazine / amiga_e / amigae.jan.archive / 000072_crash!freenet.…rleton.ca!ao443_Thu, 27 Jan 94 00:53:25 PST.msg < prev    next >
Text File  |  1994-02-17  |  3KB  |  51 lines

  1. Received: by bkhouse.cts.com (V1.17-beta/Amiga)
  2.       id <1o1r@bkhouse.cts.com>; Thu, 27 Jan 94 00:53:25 PST
  3. Received: from freenet-news.carleton.ca by crash.cts.com with smtp
  4.     (Smail3.1.28.1 #18) id m0pPE0Y-0000WSC; Wed, 26 Jan 94 09:26 PST
  5. Received: from freenet.carleton.ca by freenet-news.carleton.ca (4.1/SMI-4.0)
  6.     id AA06812; Wed, 26 Jan 94 12:26:02 EST
  7. Received: from localhost (ao443@localhost) by freenet.carleton.ca (8.6.4/8.6.4) id MAA11658; Wed, 26 Jan 1994 12:26:06 -0500
  8. Date: Wed, 26 Jan 1994 12:26:06 -0500
  9. Message-Id: <199401261726.MAA11658@freenet.carleton.ca>
  10. Reply-To: ao443@freenet.carleton.ca
  11. From: ao443@freenet.carleton.ca (Jason Maskell)
  12. To: amigae@bkhouse.cts.com
  13. Subject: Amiga E bug! (I'm pretty sure.)
  14.  
  15.     I seem to have found a bit of a bug in E. When trying to track
  16. down memory loss in Dirj, through a whole lot of debug code, I managed to
  17. track down the loss to a routine that frees a linked list of structures.
  18. The structure is something like this.
  19.  
  20. OBJECT file
  21.     next:LONG
  22.     name:LONG     /* Name is ptr to String*/
  23.     date:LONG    /* Date is ptr to datestamp */
  24.     size:LONG /* Just a long */
  25. ENDOBJECT
  26.  
  27.     Ok, name and date are allocated with String and New respectively.
  28. The freeup routine uses Dispose on both of them, ie Dispose(file.name) ;
  29. Dispose(file.date), then Dispose(file), which was also created with New().
  30. Dispose frees up the datestamp, but not the filename. Now, supposedly all
  31. memory is freed at the end of the program. This is not working. Every time
  32. I free up a list, I lose all the string memory.
  33.     Now, as a solution, to be fair to Wouter, I tried DisposeLink().
  34. Which is really a dumb thing to have to do, I must say. It worked, but
  35. obviously Strings' next fields start uninitialized because it was taking a
  36. long time and still wasn't freeing all memory.
  37.     The big kicker here is that all memory is allocated with E, and E
  38. isn't freeing up all of it at the end, even with CleanUp(). This is really
  39. screwing up my development, and is a really silly bug. If it wasn't for
  40. the fact that I like Estrings, I would be using AllocRemember already.
  41.     Wouter, any suggestions? Anyone?
  42.  
  43.     Please keep in mind that I do know what I am doing, and am not
  44. just accusing E of my faults. If you like Wouter, I will send you the code
  45. and you can check it yourself, but since this is Shareware in progress,
  46. the only other people getting it are the beta testers. 
  47.  
  48.  
  49. --
  50. 'You see son, if this were Star Trek, we'd be negotiating with this Kobold.'
  51. - Unknown Angband Player